<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">



  
  
    
    
  <script src="/roee/lib/pace/pace.min.js?v=1.0.2"></script>
  <link href="/roee/lib/pace/pace-theme-flash.min.css?v=1.0.2" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/roee/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/roee/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/roee/css/main.css?v=5.1.2" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Hexo, NexT" />








  <link rel="shortcut icon" type="image/x-icon" href="/roee/favicon.ico?v=5.1.2" />






<meta property="og:type" content="website">
<meta property="og:title" content="Roee&#39;s Blog">
<meta property="og:url" content="http://rjll.gitee.io/roee/index.html">
<meta property="og:site_name" content="Roee&#39;s Blog">
<meta property="og:locale" content="zh-Hans">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Roee&#39;s Blog">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/roee/',
    scheme: 'Gemini',
    sidebar: {"position":"left","display":"always","offset":12,"offset_float":12,"b2t":false,"scrollpercent":true,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://rjll.gitee.io/roee/"/>





  <title>Roee's Blog</title>
  














</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left 
   page-home 
 ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/roee/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Roee's Blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/roee/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/roee/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-romantic">
          <a href="/roee/520/romanticPage.html" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-heart"></i> <br />
            
            R❤️W
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/roee/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/roee/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            
  <section id="posts" class="posts-expand">
    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://rjll.gitee.io/roee/roee/2019/04/15/生活处处皆学问/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Roee">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/roee/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Roee's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/roee/2019/04/15/生活处处皆学问/" itemprop="url">生活处处皆学问</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2019-04-15T20:30:19+08:00">
                2019-04-15
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/roee/2019/04/15/生活处处皆学问/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count"
                        data-disqus-identifier="2019/04/15/生活处处皆学问/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;从上学开始一直到现在，我所获取知识的来源基本上都是从书本上来的，上大学以后接触到互联网，从网络上也学习到了很多知识，以至于后来工作以后入了码农这个坑，基本上所有的知识与信息都来自于面前的这块屏幕和手下的这把键盘，这就是人们口中常说的不与人打交道的程序员(这里主要说我自己哈，不针对任何人)</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;想要讲的是最近发生在身边的一件事，让我真的感受到了与人斗其乐无穷的那种感觉，也算是上了一课为人处世课吧</p>
          <!--noindex-->
          <div class="post-button text-center">
            <a class="btn" href="/roee/2019/04/15/生活处处皆学问/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://rjll.gitee.io/roee/roee/2018/12/07/从GitHub迁移到gitee之后图片显示不出来的问题/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Roee">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/roee/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Roee's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/roee/2018/12/07/从GitHub迁移到gitee之后图片显示不出来的问题/" itemprop="url">从GitHub迁移到gitee之后图片显示不出来的问题</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-12-07T23:00:41+08:00">
                2018-12-07
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/roee/2018/12/07/从GitHub迁移到gitee之后图片显示不出来的问题/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count"
                        data-disqus-identifier="2018/12/07/从GitHub迁移到gitee之后图片显示不出来的问题/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h1 id="迁移过程省略，百度之"><a href="#迁移过程省略，百度之" class="headerlink" title="迁移过程省略，百度之"></a>迁移过程省略，百度之</h1><h1 id="直接记录遇到的问题"><a href="#直接记录遇到的问题" class="headerlink" title="直接记录遇到的问题"></a>直接记录遇到的问题</h1><p>提交gitee成功之后，出现网页css和图片加载失败的问题，修改根目录下的配置文件_config.yml<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">## If your site is put in a subdirectory, set url as &apos;http://yoursite.com/child&apos; and root as &apos;/child/&apos;</span><br><span class="line">url: http://rjll.gitee.io/roee</span><br><span class="line">root: /roee</span><br><span class="line">permalink: :year/:month/:day/:title/</span><br><span class="line">permalink_defaults:</span><br></pre></td></tr></table></figure></p>
<p><code>url</code>字段填写Gitee Pages的网站地址</p>
<p><code>root</code>字段填写子目录，这里是<code>roee</code></p>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://rjll.gitee.io/roee/roee/2018/05/19/iOS加载bmp位图/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Roee">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/roee/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Roee's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/roee/2018/05/19/iOS加载bmp位图/" itemprop="url">iOS加载bmp位图</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-05-19T19:59:19+08:00">
                2018-05-19
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/roee/2018/05/19/iOS加载bmp位图/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count"
                        data-disqus-identifier="2018/05/19/iOS加载bmp位图/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h1 id="从网络加载bmp图片"><a href="#从网络加载bmp图片" class="headerlink" title="从网络加载bmp图片"></a>从网络加载bmp图片</h1><p>iOS加载网络图片一般会使用SDWebImage，对于jpg、png这种常见的图片格式，SDWebImage没有什么问题，最近项目中服务端存放的是.bmp位图，SDWebImage就不好使了，报错如下<br><img src="/roee/2018/05/19/iOS加载bmp位图/1.png" alt="报错1"></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Error Domain=SDWebImageErrorDomain Code=0 &quot;Downloaded image has 0 pixels&quot; UserInfo=&#123;NSLocalizedDescription=Downloaded image has 0 pixels&#125;</span><br></pre></td></tr></table></figure>
<p>于是乎我想到了用AFNetworking下载图片</p>
<pre><code class="Obj-c">AFHTTPSessionManager *sessionManager = [AFHTTPSessionManager manager];
sessionManager.responseSerializer.acceptableContentTypes = [<span class="built_in">NSSet</span> setWithObjects:<span class="string">@"image/bmp"</span>, <span class="string">@"image/jpg"</span>, <span class="string">@"image/png"</span>, <span class="string">@"image/jpeg"</span>, <span class="string">@"image/gif"</span>, <span class="literal">nil</span>];
sessionManager.responseSerializer = [AFImageResponseSerializer serializer];
sessionManager.requestSerializer = [AFHTTPRequestSerializer serializer];
<span class="built_in">NSURLRequest</span> *request = [<span class="built_in">NSURLRequest</span> requestWithURL:[<span class="built_in">NSURL</span> URLWithString:imageUrl]];
<span class="built_in">NSURLSessionDataTask</span> *task = [sessionManager dataTaskWithRequest:request uploadProgress:^(<span class="built_in">NSProgress</span> * _Nonnull uploadProgress) {

} downloadProgress:^(<span class="built_in">NSProgress</span> * _Nonnull downloadProgress) {

} completionHandler:^(<span class="built_in">NSURLResponse</span> * _Nonnull response, <span class="keyword">id</span>  _Nullable responseObject, <span class="built_in">NSError</span> * _Nullable error) {
    imageView.image = responseObject;
}];
[task resume];
</code></pre>
<p>这里需要注意，需要设置<code>sessionManager.responseSerializer.acceptableContentTypes</code>，否则同样无法获取到图片数据，<code>sessionManager.responseSerializer</code>需要设置为<code>AFImageResponseSerializer</code>，这样在请求完成回调中的<code>responseObject</code>直接就是一个UIImage对象，可以直接给<code>imageView.image</code>赋值</p>
<h1 id="从本地加载bmp图片"><a href="#从本地加载bmp图片" class="headerlink" title="从本地加载bmp图片"></a>从本地加载bmp图片</h1><p>未完待续～</p>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://rjll.gitee.io/roee/roee/2018/04/24/ReactNative热更新初探/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Roee">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/roee/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Roee's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/roee/2018/04/24/ReactNative热更新初探/" itemprop="url">ReactNative热更新初探</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-04-24T21:20:40+08:00">
                2018-04-24
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/roee/2018/04/24/ReactNative热更新初探/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count"
                        data-disqus-identifier="2018/04/24/ReactNative热更新初探/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <h2 id="ReactNative使用Code-Push集成热更新"><a href="#ReactNative使用Code-Push集成热更新" class="headerlink" title="ReactNative使用Code-Push集成热更新"></a>ReactNative使用Code-Push集成热更新</h2><p><img src="https://upload-images.jianshu.io/upload_images/2262256-d7a4236da60fc89b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/600" alt=""></p>
          <!--noindex-->
          <div class="post-button text-center">
            <a class="btn" href="/roee/2018/04/24/ReactNative热更新初探/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://rjll.gitee.io/roee/roee/2018/04/13/在hexo博客中插入本地图片的方法/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Roee">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/roee/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Roee's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/roee/2018/04/13/在hexo博客中插入本地图片的方法/" itemprop="url">在hexo博客中插入本地图片的方法</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-04-13T23:41:22+08:00">
                2018-04-13
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/roee/2018/04/13/在hexo博客中插入本地图片的方法/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count"
                        data-disqus-identifier="2018/04/13/在hexo博客中插入本地图片的方法/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>使用hexo搭建博客，生成博文之后文章中的图片却只能加载网络图片？<br>为什么不能加载hexo网站目录内的图片呢？于是乎…某度之后，有了本文，<br>这位同学Nuub的<a href="https://blog.csdn.net/sugar_rainbow/article/details/57415705" target="_blank" rel="noopener">博客</a>很好的解决了我的这个问题</p>
<p>整体步骤总结如下：</p>
<ol>
<li>打开博客网站根目录下的配置文件_config.yml，并修改<br>post_asset-folder: true</li>
</ol>
<p><img src="/roee/2018/04/13/在hexo博客中插入本地图片的方法/modify_config.png" alt="修改_config.yml"></p>
<ol start="2">
<li>在终端cd到博客目录下，运行<em>npm install hexo-asset-image –save</em>安装<a href="https://github.com/CodeFalling/hexo-asset-image" target="_blank" rel="noopener">插件</a></li>
<li><p>执行<em>hexo n xxxx</em>之后会在<em>source/_post</em>目录下生成名为<em>xxxx.md</em>和一个同名的文件夹，之后<em>要插入文章的图片就是要放在这个同名文件夹中</em></p>
</li>
<li><p>在需要引入图片的地方使用如下方法</p>
<blockquote>
<p><code>![图片替换文字](文章名称/图片名称.png)</code></p>
</blockquote>
</li>
<li><p>最后检查一下，<code>hexo g</code>生成页面后，进入<code>public\2017\02\26\index.html</code>文件中查看相关字段，可以发现，html标签内的语句是<code>&lt;img src=&quot;2017/02/26/xxxx/图片名.jpg&quot;&gt;</code>，而不是<code>&lt;img src=&quot;xxxx/图片名.jpg&gt;</code>。这很重要，关乎你的网页是否可以真正加载你想插入的图片。</p>
</li>
</ol>
<p><b>总结结束</b>。</p>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://rjll.gitee.io/roee/roee/2018/04/05/ReactNative布局学习-FlexBox/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Roee">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/roee/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Roee's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/roee/2018/04/05/ReactNative布局学习-FlexBox/" itemprop="url">ReactNative布局学习--Flex Box</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-04-05T21:39:00+08:00">
                2018-04-05
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/roee/2018/04/05/ReactNative布局学习-FlexBox/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count"
                        data-disqus-identifier="2018/04/05/ReactNative布局学习-FlexBox/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p><a href="http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html?^%$" target="_blank" rel="noopener">学习网址</a></p>
<h1 id="基本概念"><a href="#基本概念" class="headerlink" title="基本概念"></a>基本概念</h1><h1 id="一、容器属性"><a href="#一、容器属性" class="headerlink" title="一、容器属性"></a>一、容器属性</h1><p>ReactNative中flexDirection决定了主轴的方向<br><b>column</b>为垂直方向，<b>row</b>为水平方向<br><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">flex-direction</span><br><span class="line">flex-wrap </span><br><span class="line">flex-flow</span><br><span class="line">justify-content</span><br><span class="line">align-items</span><br><span class="line">align-content</span><br></pre></td></tr></table></figure></p>
<h2 id="1-1-flex-direction属性"><a href="#1-1-flex-direction属性" class="headerlink" title="1.1 flex-direction属性"></a>1.1 flex-direction属性</h2><p>flex-direction属性决定主轴的方向</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">.box&#123;</span><br><span class="line">    flex-direction: row | row-reverse | column | column-reverse;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<ul>
<li>row 主轴为水平方向，容器中各组件从左到右排列</li>
<li>row-reverse 主轴为水平方向，容器中各组件从右到左排列</li>
<li>column 主轴为垂直方向，各组建从上到下排列</li>
<li>column-reverse 主轴为垂直方向，个组件从下到上排列</li>
</ul>
<p>flexDirection为row时，justifyContent指定容器内<b>水平方向</b>项目的对齐方式，alignItems指定容器内<b>垂直方向</b>上项目的对齐方式</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">View</span> <span class="attr">style</span>=<span class="string">&#123;&#123;height:</span> <span class="attr">400</span>, <span class="attr">flexDirection:</span> '<span class="attr">row</span>', <span class="attr">justifyContent:</span> '<span class="attr">center</span>', <span class="attr">alignItems:</span> '<span class="attr">center</span>'&#125;&#125;&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">View</span> <span class="attr">style</span>=<span class="string">&#123;&#123;backgroundColor:</span> '<span class="attr">green</span>', <span class="attr">margin:</span> <span class="attr">10</span>, <span class="attr">width:</span> <span class="attr">50</span>, <span class="attr">height:50</span>&#125;&#125;&gt;</span><span class="tag">&lt;<span class="name">Text</span>&gt;</span>1<span class="tag">&lt;/<span class="name">Text</span>&gt;</span><span class="tag">&lt;/<span class="name">View</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">View</span> <span class="attr">style</span>=<span class="string">&#123;&#123;backgroundColor:</span> '<span class="attr">green</span>', <span class="attr">margin:</span> <span class="attr">10</span>, <span class="attr">width:</span> <span class="attr">50</span>, <span class="attr">height:50</span>&#125;&#125;&gt;</span><span class="tag">&lt;<span class="name">Text</span>&gt;</span>2<span class="tag">&lt;/<span class="name">Text</span>&gt;</span><span class="tag">&lt;/<span class="name">View</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">View</span> <span class="attr">style</span>=<span class="string">&#123;&#123;backgroundColor:</span> '<span class="attr">green</span>', <span class="attr">margin:</span> <span class="attr">10</span>, <span class="attr">width:</span> <span class="attr">50</span>, <span class="attr">height:50</span>&#125;&#125;&gt;</span><span class="tag">&lt;<span class="name">Text</span>&gt;</span>3<span class="tag">&lt;/<span class="name">Text</span>&gt;</span><span class="tag">&lt;/<span class="name">View</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">View</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><img src="/roee/2018/04/05/ReactNative布局学习-FlexBox/pic1.png" alt="图一"></p>
<p>flexDirection为时column时，justifyContent指定容器内<b>垂直方向</b>项目的对齐方式<br><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">View</span> <span class="attr">style</span>=<span class="string">&#123;&#123;height:</span> <span class="attr">400</span>, <span class="attr">flexDirection:</span> '<span class="attr">column</span>', <span class="attr">justifyContent:</span> '<span class="attr">center</span>', <span class="attr">alignItems:</span> '<span class="attr">flex-start</span>'&#125;&#125;&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">View</span> <span class="attr">style</span>=<span class="string">&#123;&#123;backgroundColor:</span> '<span class="attr">green</span>', <span class="attr">margin:</span> <span class="attr">10</span>, <span class="attr">width:</span> <span class="attr">50</span>, <span class="attr">height:50</span>&#125;&#125;&gt;</span></span><br><span class="line">    	<span class="tag">&lt;<span class="name">Text</span>&gt;</span>1<span class="tag">&lt;/<span class="name">Text</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">View</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">View</span> <span class="attr">style</span>=<span class="string">&#123;&#123;backgroundColor:</span> '<span class="attr">green</span>', <span class="attr">margin:</span> <span class="attr">10</span>, <span class="attr">width:</span> <span class="attr">50</span>, <span class="attr">height:50</span>&#125;&#125;&gt;</span></span><br><span class="line">    	<span class="tag">&lt;<span class="name">Text</span>&gt;</span>2<span class="tag">&lt;/<span class="name">Text</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">View</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">View</span> <span class="attr">style</span>=<span class="string">&#123;&#123;backgroundColor:</span> '<span class="attr">green</span>', <span class="attr">margin:</span> <span class="attr">10</span>, <span class="attr">width:</span> <span class="attr">50</span>, <span class="attr">height:50</span>&#125;&#125;&gt;</span><span class="tag">&lt;<span class="name">Text</span>&gt;</span>3<span class="tag">&lt;/<span class="name">Text</span>&gt;</span><span class="tag">&lt;/<span class="name">View</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">View</span>&gt;</span></span><br></pre></td></tr></table></figure></p>
<p><img src="/roee/2018/04/05/ReactNative布局学习-FlexBox/pic2.png" alt="图二"></p>
<h2 id="1-2-flex-wrap属性"><a href="#1-2-flex-wrap属性" class="headerlink" title="1.2 flex-wrap属性"></a>1.2 flex-wrap属性</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">.box&#123;flex-wrap: wrap | no-Wrap | wrap-reverse&#125;</span><br></pre></td></tr></table></figure>
<ul>
<li>wrap 换行，第一行在上方</li>
<li>no-wrap 不换行</li>
<li>wrap-reverse 换行，第一行在下方（ReactNative不支持该值）</li>
</ul>
<h2 id="1-3-flex-flow"><a href="#1-3-flex-flow" class="headerlink" title="1.3 flex-flow"></a>1.3 flex-flow</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">.box&#123;flex-flow: &lt;flex-direction&gt; || &lt;flex-wrap&gt;&#125;</span><br></pre></td></tr></table></figure>
<p>flex-flow是flex-direction和flex-wrap的简写形式</p>
<h2 id="1-4-justify-content"><a href="#1-4-justify-content" class="headerlink" title="1.4 justify-content"></a>1.4 justify-content</h2><p><em>justify-content</em> 定义了项目在<b>主轴</b>上的对齐方式<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">.box&#123;</span><br><span class="line">    justify-content: flex-start | flex-end | center | space-between | space-around</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">- flex-start  (默认值)左对齐</span><br><span class="line">- flex-end 右对齐</span><br><span class="line">- center 居中</span><br><span class="line">- space-between 两端对齐，项目之间间隔相等</span><br><span class="line">- space-around 每个项目两侧的间隔相等，项目之间的间隔比项目与边框的间隔大一倍</span><br></pre></td></tr></table></figure></p>
<h2 id="1-5-align-items"><a href="#1-5-align-items" class="headerlink" title="1.5 align-items"></a>1.5 align-items</h2><p><em>align-items</em>定义了项目在<b>交叉轴</b>上的对齐方式</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">.box&#123;</span><br><span class="line">    align-items: flex-start | flex-end | center | baseline | stretch</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">- flex-start 交叉轴起点对齐（顶部对齐）</span><br><span class="line">- flex-end 交叉轴终点对齐 （底部对齐）</span><br><span class="line">- center 交叉轴中点对齐</span><br><span class="line">- baseline 项目的第一行文字基线对齐</span><br><span class="line">- stretch （默认值）若项目未设置高度或者设为auto，将占满整个容器高度（见名知意，也就是拉伸的意思，撑满整个将项目撑满整个容器）</span><br></pre></td></tr></table></figure>
<h2 id="1-6-align-content"><a href="#1-6-align-content" class="headerlink" title="1.6 align-content"></a>1.6 align-content</h2><p>属性定义了<a href="https://www.cnblogs.com/strangerqt/p/5094968.html" target="_blank" rel="noopener">多根轴线</a>的对齐方式。如果项目只有一根轴线，该属性不起作用。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">.box&#123;</span><br><span class="line">    align-content: flex-start | flex-end | center | stretch | space-between | space-around</span><br><span class="line">&#125;</span><br><span class="line">- flex-start 与交叉轴的起点对齐</span><br><span class="line">- flex-end 与交叉轴终点对齐</span><br><span class="line">- center 与交叉轴的中点对齐</span><br><span class="line">- stretch 轴线占满整个容器（默认）</span><br><span class="line">- space-between 与交叉轴的两端对齐，轴线之间间隔平均分布</span><br><span class="line">- space-around 每两根轴线之间间隔相等，所以轴线之间间隔比轴线与边框之间间隔大一倍</span><br></pre></td></tr></table></figure>
<h1 id="二、项目的属性"><a href="#二、项目的属性" class="headerlink" title="二、项目的属性"></a>二、项目的属性</h1><p>项目的属性<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">- order ReactNative不支持</span><br><span class="line">- flex-grow 项目放大比例</span><br><span class="line">- flex-shrink 项目缩小比例</span><br><span class="line">- flex-basis</span><br><span class="line">- flex</span><br><span class="line">- align-self</span><br></pre></td></tr></table></figure></p>
<h2 id="2-1-order属性（ReactNative不支持）"><a href="#2-1-order属性（ReactNative不支持）" class="headerlink" title="2.1 order属性（ReactNative不支持）"></a>2.1 order属性（ReactNative不支持）</h2><p>order 定义项目的排列顺序，数值越小越排列靠前<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">.item&#123;</span><br><span class="line">    order: &lt;integer&gt;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<h2 id="2-2-flex-grow属性"><a href="#2-2-flex-grow属性" class="headerlink" title="2.2 flex-grow属性"></a>2.2 flex-grow属性</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">.item&#123;</span><br><span class="line">    flex-grow: &lt;number&gt;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>如果所有项目的flex-grow属性都为1，则它们将等分剩余空间（如果有的话）。如果一个项目的flex-grow属性为2，其他项目都为1，则前者占据的剩余空间将比其他项多一倍。</p>
<h2 id="2-3-flex-shrink属性"><a href="#2-3-flex-shrink属性" class="headerlink" title="2.3 flex-shrink属性"></a>2.3 flex-shrink属性</h2><p>flex-shrink属性定义了项目的缩小比例，默认为1，即如果空间不足，该项目将缩小。<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">.item &#123;</span><br><span class="line">    flex-shrink: &lt;number&gt;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>如果所有项目的flex-shrink属性都为1，当空间不足时，都将等比例缩小。如果一个项目的flex-shrink属性为0，其他项目都为1，则空间不足时，前者不缩小。<br>负值对该属性无效。</p>
<h2 id="2-4-align-self属性"><a href="#2-4-align-self属性" class="headerlink" title="2.4 align-self属性"></a>2.4 align-self属性</h2><p>对应ReactNative中alignSelf属性，align-self属性允许单个item使用与其他项目不一样的对齐方式，可以覆盖align-items，默认值为auto，表示继承父元素的align-items属性<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">.item&#123;</span><br><span class="line">    align-self: auto | flex-start | flex-end | center | stretch | baseline</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://rjll.gitee.io/roee/roee/2018/01/01/2018之开篇/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Roee">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/roee/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Roee's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/roee/2018/01/01/2018之开篇/" itemprop="url">2018之开篇</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-01-01T21:57:30+08:00">
                2018-01-01
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/roee/2018/01/01/2018之开篇/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count"
                        data-disqus-identifier="2018/01/01/2018之开篇/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <p>首先嘞，很久没有写东西了，2017结束了，迎来了2018，我们总是在辞旧迎新的时候要说些振奋人心的话，用以激励自己在新的一年里努力变的更优(you)秀(qian)。(-_-)！<br></p>
          <!--noindex-->
          <div class="post-button text-center">
            <a class="btn" href="/roee/2018/01/01/2018之开篇/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://rjll.gitee.io/roee/roee/2017/10/24/最近半年的工作总结/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Roee">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/roee/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Roee's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/roee/2017/10/24/最近半年的工作总结/" itemprop="url">最近半年的工作总结</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-10-24T21:49:49+08:00">
                2017-10-24
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/roee/2017/10/24/最近半年的工作总结/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count"
                        data-disqus-identifier="2017/10/24/最近半年的工作总结/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>2017年2月13号入职的这家公司，工作到现在，总共8个月的时间，从事iOS软件开发工作</p>
<h4 id="工作内容"><a href="#工作内容" class="headerlink" title="工作内容"></a>工作内容</h4><p>来到公司之后的主要工作是对之前项目的重构，由于之前项目各种闪退，各种bug，所以索性直接对照着功能点对该项目进行重写，复用可以复用的功能方法，完成了第一版的项目开发，之后由于BOSS对于项目的各种提要求，变需求，我们便开始了一直持续到现在的需求讨论外加demo实现验证阶段，工作的节奏基本上就是这样的：</p>
<blockquote>
<p>大概两周左右向BOSS进行一次工作汇报，然后演示一下这段时间的工作成果（即做出来点什么东东，就是看看APP，然后说说之后要干嘛，吹吹牛比），我们演示一般只占用工作汇报的十分之一时间，剩下的十分之九的时间由BOSS提出新的需求和改进建议，然后我们在之后的时间里去把这些需求和建议实现到项目中去。</p>
</blockquote>
<h4 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h4><p>技术方面：对蓝牙、数据库、网络状况判断、文件下载等方面的知识进行了较为深入的研究<br>个人认知：认识到了环境不仅可以影响一个人，环境更造就了一大批人</p>
<h4 id="展望"><a href="#展望" class="headerlink" title="展望"></a>展望</h4><p>希望现做的这个项目在明年年初可以上线运营，也算是对今年一年的工作的一个交代，另外，希望在今后的日子里自己能够抓住机会，好好努力，变得更强。</p>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://rjll.gitee.io/roee/roee/2017/09/13/工作两年之-感悟-md/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Roee">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/roee/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Roee's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/roee/2017/09/13/工作两年之-感悟-md/" itemprop="url">工作两年之---感悟.md</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-09-13T22:15:37+08:00">
                2017-09-13
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/roee/2017/09/13/工作两年之-感悟-md/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count"
                        data-disqus-identifier="2017/09/13/工作两年之-感悟-md/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <blockquote>
<p>不是你不行，只是努力错了方向</p>
</blockquote>
<p>确切的来讲，从大学毕业到现在已经有3个年头，这三年中我没有找到大人们口中的那种稳定工作，一直从事着我的这份不稳定的工作，这也导致我在这3年中一共换了3次工作单位……最近的一次是在2017年2月，也就是今年年初，换单位的原因是因为在上一家单位看不到自己任何的未来，于是乎寄希望于下一家能够给我带来希望，结果呢，不出所料，换了环境之后的确是有了些许改观，但是最近同样的问题又向我袭来，完成了初到新环境的适应阶段后，经过一段时间的发力学习，具备了应对当前工作的能力，但是产品迟迟不能发布，需求一次又一次的变更，那种产品成功发布的成就感慢慢离我而去……心里失落至极。只能安慰自己说不管怎样，即使没有好好工作，工资一样还是不会少一分钱，有时候也只能用这种阿Q精神安慰自己。</p>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://rjll.gitee.io/roee/roee/2017/07/08/使用NSURLSession实现iOS大文件分块下载/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Roee">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/roee/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Roee's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/roee/2017/07/08/使用NSURLSession实现iOS大文件分块下载/" itemprop="url">使用NSURLSession实现iOS大文件分块下载</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-07-08T16:00:20+08:00">
                2017-07-08
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/roee/2017/07/08/使用NSURLSession实现iOS大文件分块下载/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count"
                        data-disqus-identifier="2017/07/08/使用NSURLSession实现iOS大文件分块下载/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <p>如果在网速一定的情境下，大文件（目前指的是100M以上的文件）的下载对用户来说是一段不短的时间，用户体验不是很好。<br></p>
          <!--noindex-->
          <div class="post-button text-center">
            <a class="btn" href="/roee/2017/07/08/使用NSURLSession实现iOS大文件分块下载/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
  </section>

  
  <nav class="pagination">
    <span class="page-number current">1</span><a class="page-number" href="/roee/page/2/">2</a><a class="extend next" rel="next" href="/roee/page/2/"><i class="fa fa-angle-right"></i></a>
  </nav>



          </div>
          


          

        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      

      <section class="site-overview sidebar-panel sidebar-panel-active">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/roee/images/avatar.jpg"
               alt="Roee" />
          <p class="site-author-name" itemprop="name">Roee</p>
           
              <p class="site-description motion-element" itemprop="description"></p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/roee/archives/">
                <span class="site-state-item-count">12</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/roee/tags/index.html">
                <span class="site-state-item-count">8</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/llMrRongll" target="_blank" title="github">
                  
                    <i class="fa fa-fw fa-globe"></i>
                  
                    
                      github
                    
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Roee</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Gemini
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
          <span id="scrollpercent"><span>0</span>%</span>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/roee/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/roee/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/roee/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/roee/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/roee/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/roee/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/roee/js/src/utils.js?v=5.1.2"></script>

  <script type="text/javascript" src="/roee/js/src/motion.js?v=5.1.2"></script>



  
  


  <script type="text/javascript" src="/roee/js/src/affix.js?v=5.1.2"></script>

  <script type="text/javascript" src="/roee/js/src/schemes/pisces.js?v=5.1.2"></script>



  
    <script type="text/javascript" src="/roee/js/src/scrollspy.js?v=5.1.2"></script>
<script type="text/javascript" src="/roee/js/src/post-details.js?v=5.1.2"></script>

  

  


  <script type="text/javascript" src="/roee/js/src/bootstrap.js?v=5.1.2"></script>



  


  

    
      <script id="dsq-count-scr" src="https://roee-1.disqus.com/count.js" async></script>
    

    

  




	





  








  





  

  

  

  
  
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      });
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      });
    </script>
    <script type="text/javascript" src="//cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
  


  

  

</body>
</html>
